// Copyright (c) 2009-2011, chunquedong
//
// This file is part of ChunMap project
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE(Version >=3)
//
// History:
//   2011-10-30  Jed Young  Creation
//

using [java]com.vividsolutions.jts.geom::Geometry as JGeometry
using [java]com.vividsolutions.jts.operation.buffer::BufferOp as JBufferOp
using chunmapModel

class BufferOp
{
  Jts jts := Jts()

  Geometry buffer(Geometry g, Float distance)
  {
    jg := JBufferOp.bufferOp(jts.toJts(g), distance)
    return jts.toCm(jg)
  }
}